﻿<%@ Control Language="C#" AutoEventWireup="true" CodeBehind="UserPermisstion.ascx.cs" Inherits="ERP.Modules.UserPermisstion" %>
<%-------------------------------%>
<ext:Hidden ID="FormatTypeUserPermisstion" runat="server" />
<ext:Panel runat="server" Layout="Fit" Border="False" ID="PanelMainUserPermisstion">
    <Content>
        <%--------------GridUserPermisstion-----------------%>
        <ext:GridPanel
            ID="grUserPermisstion"
            Cls="grid-double"
            runat="server"
            EnableColumnMove="true"
            Border="False">
            <%-------------StoreUserPermisstion-----------------%>
            <Store>
                <ext:Store
                    ID="StoreUserPermisstion"
                    runat="server"
                    OnReadData="StoreUserPermisstion_RefreshData"
                    PageSize="20">
                    <Model>
                        <ext:Model ID="ModelUserPermisstion" runat="server" IDProperty="ID" GroupField="Group_Name">
                            <Fields>
                                <ext:ModelField Name="ID" Type="Int" />
                                <ext:ModelField Name="ModulesMain_ID" Type="Int" />
                                <ext:ModelField Name="ModulesParent_ID" Type="Int" />
                                <ext:ModelField Name="Group_Id" Type="Int" />
                                <ext:ModelField Name="ModulesMainDescripttion" Type="String" />
                                <ext:ModelField Name="ModulesParentDescripttion" Type="String" />
                                <ext:ModelField Name="Group_Name" Type="String" />
                                <ext:ModelField Name="PermisstionNumber" Type="Int" />
                                <ext:ModelField Name="IsbtnView" Type="Boolean" />
                                <ext:ModelField Name="IsbtnAddNew" Type="Boolean" />
                                <ext:ModelField Name="IsbtnEdit" Type="Boolean" />
                                <ext:ModelField Name="IsbtnDelete" Type="Boolean" />
                                <ext:ModelField Name="IsbtnReview" Type="Boolean" />
                                <ext:ModelField Name="IsbtnCancel" Type="Boolean" />
                                <ext:ModelField Name="IsbtnPrint" Type="Boolean" />
                                <ext:ModelField Name="IsPageMain" Type="Boolean" />
                                <ext:ModelField Name="IsPageParrent" Type="Boolean" />
                                <ext:ModelField Name="Descripttion" Type="String" />
                            </Fields>
                        </ext:Model>
                    </Model>
                </ext:Store>
            </Store>
            <ColumnModel runat="server">
                <Columns>
                    <ext:RowNumbererColumn ID="RowNumbererColumnUserPermisstion" runat="server" Width="30" Align="Center" />
                    <ext:Column runat="server" Text="Tên Modules" Width="100" DataIndex="ModulesMainDescripttion"></ext:Column>
                    <ext:Column runat="server" Text="Tên danh mục" Width="100" DataIndex="ModulesParentDescripttion"></ext:Column>
                    <ext:Column runat="server" Text="Nhóm quyền" Width="100" DataIndex="Group_Name"></ext:Column>
                    <ext:Column runat="server" Text="PermisstionNumber" Width="100" DataIndex="PermisstionNumber" Align="Center" Visible="False"></ext:Column>
                    <ext:CheckColumn runat="server" Text="Xem" Width="50" DataIndex="IsbtnView" Align="Center" StopSelection="False" Editable="True"></ext:CheckColumn>
                    <ext:CheckColumn runat="server" Text="Thêm" Width="50" DataIndex="IsbtnAddNew" Align="Center" StopSelection="False" Editable="True"></ext:CheckColumn>
                    <ext:CheckColumn runat="server" Text="Sửa" Width="50" DataIndex="IsbtnEdit" Align="Center" StopSelection="False" Editable="True"></ext:CheckColumn>
                    <ext:CheckColumn runat="server" Text="Xoá" Width="50" DataIndex="IsbtnDelete" Align="Center" StopSelection="False" Editable="True"></ext:CheckColumn>
                    <ext:CheckColumn runat="server" Text="Duyệt" Width="50" DataIndex="IsbtnReview" Align="Center" StopSelection="False" Editable="True"></ext:CheckColumn>
                    <ext:CheckColumn runat="server" Text="Bỏ duyệt" Width="80" DataIndex="IsbtnCancel" Align="Center" StopSelection="False" Editable="True"></ext:CheckColumn>
                    <ext:CheckColumn runat="server" Text="In" Width="50" DataIndex="IsbtnPrint" Align="Center" StopSelection="False" Editable="True"></ext:CheckColumn>
                    <ext:CheckColumn runat="server" Text="Module" Width="80" DataIndex="IsPageMain" Align="Center" StopSelection="False" Editable="True"></ext:CheckColumn>
                    <ext:CheckColumn runat="server" Text="Danh mục" Width="80" DataIndex="IsPageParrent" Align="Center" StopSelection="False" Editable="True"></ext:CheckColumn>
                    <ext:Column runat="server" Text="Diễn giải" Width="150" DataIndex="Descripttion" Flex="1"></ext:Column>
                </Columns>
            </ColumnModel>
            <Features>
                <ext:Grouping 
                    runat="server" 
                    HideGroupedHeader="true"
                    GroupByText="Xem theo phân nhóm"
                    ShowGroupsText="Phân nhóm"
                    GroupHeaderTplString="{name} ({rows.length} danh mục con {[values.rows.length > 1 ? '' : '']})"
                    StartCollapsed="True" />
            </Features>
            <DirectEvents>
                <ItemDblClick OnEvent="UserPermisstionDblClick">
                    <ExtraParams>
                        <ext:Parameter Name="ID" Value="record.data.ID" Mode="Raw" />
                    </ExtraParams>
                    <EventMask ShowMask="true" Msg="Đang tải..." />
                </ItemDblClick>
            </DirectEvents>
            <SelectionModel>
                <ext:CheckboxSelectionModel runat="server" Mode="Multi">
                     <Listeners>
                       <SelectionChange Handler="
                            if (selected.length == 0) {
                                #{btnEdit}.disable();
                                #{btnDel}.disable();
                                #{btnExport}.disable();
                            } else {
                                #{btnEdit}.enable();
                                #{btnDel}.enable();
                                #{btnExport}.enable();
                            }" />
                   </Listeners>
                </ext:CheckboxSelectionModel>
            </SelectionModel>
            <DockedItems>
                <ext:Toolbar ID="ToolbarTopMain" runat="server" Dock="Top">
                    <Items>
                        <ext:Button ID="btnAddNew" runat="server" Text="Thêm mới" Icon="ApplicationAdd">
                            <DirectEvents>
                                <Click OnEvent="btnAddNew_Click">
                                    <EventMask ShowMask="true" Msg="Đang tải..." />
                                </Click>
                            </DirectEvents>
                        </ext:Button>
                        <ext:ToolbarSeparator />
                        <ext:Button ID="btnEdit" runat="server" Text="Sửa" Icon="ApplicationEdit">
                            <DirectEvents>
                                <Click OnEvent="btnEdit_Click">
                                    <EventMask ShowMask="true" Msg="Đang tải..." />
                                     <ExtraParams>
                                        <ext:Parameter Name="grUserPermisstion" Value="Ext.encode(#{grUserPermisstion}.getRowsValues({selectedOnly : true}))" Mode="Raw" />
                                    </ExtraParams>
                                </Click>
                            </DirectEvents>
                        </ext:Button>
                        <ext:ToolbarSeparator />
                        <ext:Button ID="btnDel" runat="server" Text="Xoá" Icon="ApplicationDelete">
                            <DirectEvents>
                                <Click OnEvent="btnDel_Click">
                                    <EventMask ShowMask="true" Msg="Đang tải..." />
                                    <ExtraParams>
                                        <ext:Parameter Name="name" Value="btnDel"></ext:Parameter>
                                    </ExtraParams>
                                    <Confirmation ConfirmRequest="true"
                                        Title="Thông Báo" Message="Bạn có muốn xoá mẫu tin này không ?">
                                    </Confirmation>
                                </Click>
                            </DirectEvents>
                        </ext:Button>
                        <ext:ToolbarSeparator />
                        <ext:Button ID="btnExport" runat="server" Text="Xuất tập tin" Icon="Printer">
                            <Menu>
                                <ext:Menu ID="MenuMain" runat="server">
                                    <Items>
                                        <ext:MenuItem ID="MenuItemExportXML" runat="server" Text="XML" Icon="PageCode">
                                            <Listeners>
                                                <Click Handler="submitValue(#{grUserPermisstion}, #{FormatTypeUserPermisstion}, 'xml');" />
                                            </Listeners>
                                        </ext:MenuItem>
                                    </Items>
                                </ext:Menu>
                            </Menu>
                        </ext:Button>
                    </Items>
                </ext:Toolbar>
                <ext:Toolbar runat="server" Dock="Bottom" AnchorHorizontal="100%">
                    <Items>
                        <ext:TriggerField ID="txtSearch" runat="server" Width="200" EnableKeyEvents="true" MarginSpec="0 8 0 0">
                            <Triggers>
                                <ext:FieldTrigger Icon="Search" />
                            </Triggers>
                            <DirectEvents>
                                <TriggerClick OnEvent="Search_Event"></TriggerClick>
                                <KeyUp OnEvent="Search_Event"></KeyUp>
                                <KeyPress OnEvent="Search_Event"></KeyPress>
                            </DirectEvents>
                        </ext:TriggerField>
                        <ext:SelectBox
                            ID="SelectBoxModulesMainUserPermisstion"
                            runat="server"
                            Cls="x-select-box"
                            DisplayField="Descripttion"
                            ValueField="ModulesMain_ID"
                            MarginSpec="0 8 0 0"
                            EmptyText="Chọn Modules Main">
                            <Store>
                                <ext:Store ID="StoreModulesMainUserPermisstion" runat="server">
                                    <Model>
                                        <ext:Model runat="server">
                                            <Fields>
                                                <ext:ModelField Name="Descripttion" />
                                                <ext:ModelField Name="ModulesMain_ID" />
                                            </Fields>
                                        </ext:Model>
                                    </Model>
                                </ext:Store>
                            </Store>
                            <DirectEvents>
                                <Select OnEvent="SelectIndexUserPermisstion_Change">
                                    <EventMask ShowMask="true" Msg="Đang tải..."></EventMask>
                                </Select>
                            </DirectEvents>
                        </ext:SelectBox>
                        <ext:SelectBox
                            ID="SelectBoxModulesParrentUserPermisstion"
                            runat="server"
                            Cls="x-select-box"
                            DisplayField="Descripttion"
                            ValueField="ModulesParent_ID"
                            MarginSpec="0 8 0 0"
                            EmptyText="Chọn Modules Parrent">
                            <Store>
                                <ext:Store ID="StoreModulesParrentUserPermisstion" runat="server">
                                    <Model>
                                        <ext:Model runat="server">
                                            <Fields>
                                                <ext:ModelField Name="Descripttion" />
                                                <ext:ModelField Name="ModulesParent_ID" />
                                            </Fields>
                                        </ext:Model>
                                    </Model>
                                </ext:Store>
                            </Store>
                            <DirectEvents>
                                <Select OnEvent="SelectIndexModulesParrentUserPermisstion_Change">
                                    <EventMask ShowMask="true" Msg="Đang tải..."></EventMask>
                                </Select>
                            </DirectEvents>
                        </ext:SelectBox>
                        <ext:SelectBox
                            ID="SelectBoxUserGorupUserPermisstion"
                            runat="server"
                            Cls="x-select-box"
                            DisplayField="Group_Name"
                            ValueField="Group_Id"
                            MarginSpec="0 8 0 0"
                            EmptyText="Chọn nhóm quyền">
                            <Store>
                                <ext:Store ID="StoreUserGorupUserPermisstion" runat="server">
                                    <Model>
                                        <ext:Model runat="server">
                                            <Fields>
                                                <ext:ModelField Name="Group_Name" />
                                                <ext:ModelField Name="Group_Id" />
                                            </Fields>
                                        </ext:Model>
                                    </Model>
                                </ext:Store>
                            </Store>
                            <DirectEvents>
                                <Select OnEvent="SelectIndexGorupUserPermisstion_Change">
                                    <EventMask ShowMask="true" Msg="Đang tải..."></EventMask>
                                </Select>
                            </DirectEvents>
                        </ext:SelectBox>
                        <ext:PagingToolbar ID="PagingToolbarUserPermisstion" runat="server" StoreID="StoreUserPermisstion" BeforePageText="Trang" AfterPageText="của {0}" LastText="Cuối" NextText="Kế tiếp" PrevText="Trở lại" FirstText="Đầu" RefreshText="Làm tươi" DisplayInfo="true" DisplayMsg="Trang {0} - {1} của {2}" />
                    </Items>
                </ext:Toolbar>
            </DockedItems>
        </ext:GridPanel>
    </Content>
</ext:Panel>
<ext:Panel runat="server">
    <Content>
        <%-----------WindowsUserPermisstion-----------------%>
        <ext:Window ID="WindowsUserPermisstion" runat="server"
            Title="Phân quyền"
            DefaultAnchor="100%"
            Width="462px"
            Height="539px"
            Hidden="true"
            AutoScroll="False"
            Maximizable="False"
            Minimizable="False"
            AutoDataBind="true"
            Region="Center"
            Resizable="true"
            Modal="true"
            HideMode="Offsets"
            Border="false"
            Padding="5"
            DefaultButton="btnSavePopUp">
            <Items>
                <ext:Toolbar ID="ToolbarUserPermisstion" runat="server">
                    <Items>
                        <ext:Button runat="server" Text="Lưu lại" Icon="Disk" ID="btnSavePopUp">
                            <DirectEvents>
                                <Click OnEvent="btnSavePopUp_Click" Before="return #{FormPanelUserPermisstion}.isValid();">
                                    <EventMask ShowMask="true" Msg="Đang tải..." />
                                </Click>
                            </DirectEvents>
                        </ext:Button>
                        <ext:ToolbarSeparator />
                        <ext:Button runat="server" Text="Thêm Modules" Icon="Add" ID="btnAddModules">
                            <DirectEvents>
                                <Click OnEvent="btnAddModules_Click">
                                    <EventMask ShowMask="true" Msg="Đang tải..." />
                                </Click>
                            </DirectEvents>
                        </ext:Button>
                        <ext:ToolbarSeparator />
                        <ext:Button runat="server" Text="Thêm nhóm quyền" Icon="Add" ID="btnGroupUserPermiss">
                            <DirectEvents>
                                <Click OnEvent="btnGroupUserPermiss_Click">
                                    <EventMask ShowMask="true" Msg="Đang tải..." />
                                </Click>
                            </DirectEvents>
                        </ext:Button>
                        <ext:ToolbarSeparator />
                        <ext:Button runat="server" Text="Huỷ bỏ" Icon="Decline" ID="btnCancelPopUp">
                            <DirectEvents>
                                <Click OnEvent="btnCancelPopUp_Click">
                                    <EventMask ShowMask="true" Msg="Đang tải..." />
                                </Click>
                            </DirectEvents>
                        </ext:Button>
                    </Items>
                </ext:Toolbar>
                <ext:Hidden ID="hdIDUserPermisstion" runat="server" FieldLabel="ID Bank:" AllowBlank="false" Width="250" Visible="True" Margins="0 20 0 0"></ext:Hidden>
                <ext:FormPanel ID="FormPanelUserPermisstion" runat="server"
                    BodyPadding="10"
                    Frame="true"
                    DefaultAnchor="100%">
                    <Items>
                        <ext:Hidden ID="hdIDModulesMain" LabelAlign="Top" LabelStyle="font-weight: 600" runat="server" FieldLabel="Mã nhóm quyền (*)" AllowBlank="false" Width="250" Margins="0 20 0 0" /> 
                        <ext:Hidden ID="hdIDModulesParrent" LabelAlign="Top" LabelStyle="font-weight: 600" runat="server" FieldLabel="Mã nhóm quyền (*)" AllowBlank="false" Width="250" Margins="0 20 0 0" /> 
                        <ext:Hidden ID="hdIDGroup_User" LabelAlign="Top" LabelStyle="font-weight: 600" runat="server" FieldLabel="Mã nhóm quyền (*)" AllowBlank="false" Width="250" Margins="0 20 0 0" /> 
                        <ext:TextField ID="txtModulesMain" LabelAlign="Top" LabelStyle="font-weight: 600" runat="server" FieldLabel="Tên Modules (*)" AllowBlank="false" Width="250" Margins="0 20 0 0" ReadOnly="True" FieldCls="readonly" /> 
                        <ext:TextField ID="txtModulesParrent" LabelAlign="Top" LabelStyle="font-weight: 600" runat="server" FieldLabel="Tên danh mục (*)" AllowBlank="false" Width="250" Margins="0 20 0 0" ReadOnly="True" FieldCls="readonly" />
                        <ext:TextField ID="txtGroupName" LabelAlign="Top" LabelStyle="font-weight: 600" runat="server" FieldLabel="Nhóm quyền (*)" AllowBlank="false" Width="250" Margins="0 20 0 0" ReadOnly="True" FieldCls="readonly" />
                         <ext:Container ID="Container1" runat="server" Layout="HBoxLayout" MarginSpec="0 0 10">
                            <Items>
                                <ext:FieldSet runat="server" 
                                    Flex="1" 
                                    Title="Chức năng" 
                                    Layout="AnchorLayout"
                                    DefaultAnchor="100%">
                                    <Items>
                                        <ext:Checkbox ID="chkAddNew" runat="server" BoxLabel="Thêm" />
                                        <ext:Checkbox ID="chkView" runat="server" BoxLabel="Xem" />
                                        <ext:Checkbox ID="chkEdit" runat="server" BoxLabel="Sửa" />
                                        <ext:Checkbox ID="chkDel" runat="server" BoxLabel="Xoá" />
                                        <ext:Checkbox ID="chkReview" runat="server" BoxLabel="Duyệt" />
                                        <ext:Checkbox ID="chkCancel" runat="server" BoxLabel="Bỏ duyệt" />
                                        <ext:Checkbox ID="chkPrint" runat="server" BoxLabel="In" />
                                    </Items>
                                 </ext:FieldSet>
                                <ext:Component runat="server" Width="10" />
                                <ext:FieldSet runat="server" 
                                    Flex="1" 
                                    Height="182px"
                                    Title="Trang" 
                                    Layout="AnchorLayout"
                                    DefaultAnchor="100%">
                                    <Items>
                                        <ext:Checkbox ID="chkIsPageModuleMain" runat="server" BoxLabel="Trang" />
                                        <ext:Checkbox ID="chkIsPageModulesParrent" runat="server" BoxLabel="Danh mục" />
                                    </Items>
                                </ext:FieldSet>
                            </Items>
                         </ext:Container>
                        <ext:TextArea ID="txtDescription" LabelAlign="Top" LabelStyle="font-weight: 600" runat="server" FieldLabel="Diễn giải (*)" AnchorHorizontal="100%" Height="100" AllowBlank="True" FieldStyle="text-align:left;" />
                    </Items>
                </ext:FormPanel>
            </Items>
        </ext:Window>
        <%-----------WindowsUserModule-----------------%>
        <ext:Window ID="WindowUserPermisstionModules" runat="server"
            Title="Thông tin Modules"
            DefaultAnchor="100%"
            Width="829"
            Height="400"
            Hidden="true"
            AutoScroll="false"
            Maximizable="False"
            Minimizable="False"
            AutoDataBind="true"
            Region="Center"
            Resizable="False"
            Modal="true"
            Layout="Fit"
            HideMode="Offsets"
            Constrain="True">
            <Content>
                <ext:GridPanel
                    ID="grPermisstionModules"
                    Border="True"
                    runat="server"
                    AutoWidth="true"
                    AutoScroll="true"
                    Cls="gird"
                    EnableColumnMove="true">
                    <Store>
                        <ext:Store
                            ID="StorePermisstionModules"
                            runat="server"
                            OnReadData="StorePermisstionModules_RefreshData"
                            PageSize="10">
                            <Model>
                                <ext:Model runat="server" IDProperty="ModulesParent_ID">
                                    <Fields>
                                        <ext:ModelField Name="ModulesParent_Name" Type="String" />
                                        <ext:ModelField Name="Descripttion" Type="String" />
                                    </Fields>
                                </ext:Model>
                            </Model>
                        </ext:Store>
                    </Store>
                    <ColumnModel runat="server">
                        <Columns>
                             <ext:RowNumbererColumn ID="RowNumbererColumnPermisstionModules" runat="server" Width="30" Align="Center" />
                            <ext:Column runat="server" Text="Tên User Control" Width="150" DataIndex="ModulesParent_Name"></ext:Column>
                            <ext:Column runat="server" Text="Tên Modules" Width="200" DataIndex="Descripttion"  Flex="1"></ext:Column>
                        </Columns>
                    </ColumnModel>
                    <SelectionModel>
                        <ext:CellSelectionModel runat="server">
                            <DirectEvents>
                                <Select OnEvent="PermisstionModules_Click">
                                    <EventMask ShowMask="true" Msg="Đang tải..." />
                                </Select>
                            </DirectEvents>
                        </ext:CellSelectionModel>
                    </SelectionModel>
                    <TopBar>
                        <ext:Toolbar ID="ToolbarTopPermisstionModules" runat="server">
                            <Items>
                               <ext:SelectBox
                                    ID="SelectBoxPermisstionModulesCode"
                                    runat="server"
                                    Cls="x-select-box"
                                    DisplayField="Descripttion"
                                    ValueField="ModulesMain_ID"
                                    EmptyText="Chọn Modules">
                                    <Store>
                                        <ext:Store ID="StoreOrderPermisstionModules" runat="server">
                                            <Model>
                                                <ext:Model runat="server">
                                                    <Fields>
                                                        <ext:ModelField Name="Descripttion" />
                                                        <ext:ModelField Name="ModulesMain_ID" />
                                                    </Fields>
                                                </ext:Model>
                                            </Model>
                                        </ext:Store>
                                    </Store>
                                    <Triggers>
                                        <ext:FieldTrigger Icon="Ellipsis" Qtip="Tải lại" />
                                    </Triggers>
                                    <DirectEvents>
                                        <Select OnEvent="SelectIndexPermisstionModules_Change">
                                            <EventMask ShowMask="true" Msg="Đang tải..."></EventMask>
                                        </Select>
                                        <TriggerClick OnEvent="RefreshTigerPermisstionModules_Click">
                                            <EventMask ShowMask="true" Msg="Đang tải..."></EventMask>
                                        </TriggerClick>
                                    </DirectEvents>
                                </ext:SelectBox>
                            </Items>
                        </ext:Toolbar>
                    </TopBar>
                    <DockedItems>
                        <ext:Toolbar runat="server" Dock="Bottom" AnchorHorizontal="100%">
                            <Items>
                                <ext:PagingToolbar ID="PagingToolbarPermisstionModules" runat="server" StoreID="StorePermisstionModules" BeforePageText="Trang" AfterPageText="của {0}" LastText="Cuối" NextText="Kế tiếp" PrevText="Trở lại" FirstText="Đầu" RefreshText="Làm tươi" DisplayInfo="true" DisplayMsg="Trang {0} - {1} của {2}" />
                            </Items>
                        </ext:Toolbar>
                    </DockedItems>
                </ext:GridPanel>
            </Content>
        </ext:Window>
        <%-----------WindowsGroupUser-----------------%>
        <ext:Window ID="WindowGroupUserPermisstionModules" runat="server"
            Title="Thông tin nhóm quyền"
            DefaultAnchor="100%"
            Width="829"
            Height="400"
            Hidden="true"
            AutoScroll="false"
            Maximizable="False"
            Minimizable="False"
            AutoDataBind="true"
            Region="Center"
            Resizable="False"
            Modal="true"
            Layout="Fit"
            HideMode="Offsets"
            Constrain="True">
            <Content>
                <ext:GridPanel
                    ID="grGroupUserPermisstionModules"
                    Border="True"
                    runat="server"
                    AutoWidth="true"
                    AutoScroll="true"
                    Cls="gird"
                    EnableColumnMove="true">
                    <Store>
                        <ext:Store
                            ID="StoreGroupUserPermisstionModules"
                            runat="server"
                            OnReadData="StoreGroupUserPermisstionModules_RefreshData"
                            PageSize="10">
                            <Model>
                                <ext:Model runat="server" IDProperty="Group_Id">
                                    <Fields>
                                        <ext:ModelField Name="Group_User_Code" Type="String" />
                                        <ext:ModelField Name="Group_Name" Type="String" />
                                    </Fields>
                                </ext:Model>
                            </Model>
                        </ext:Store>
                    </Store>
                    <ColumnModel runat="server">
                        <Columns>
                             <ext:RowNumbererColumn ID="RowNumbererColumnGroupUserPermisstionModules" runat="server" Width="30" Align="Center" />
                            <ext:Column runat="server" Text="Mã nhóm quyền" Width="150" DataIndex="Group_User_Code"></ext:Column>
                            <ext:Column runat="server" Text="Tên nhóm quyền" Width="200" DataIndex="Group_Name"  Flex="1"></ext:Column>
                        </Columns>
                    </ColumnModel>
                    <SelectionModel>
                        <ext:CellSelectionModel runat="server">
                            <DirectEvents>
                                <Select OnEvent="GroupUserPermisstionModules_Click">
                                    <EventMask ShowMask="true" Msg="Đang tải..." />
                                </Select>
                            </DirectEvents>
                        </ext:CellSelectionModel>
                    </SelectionModel>
                    <DockedItems>
                        <ext:Toolbar runat="server" Dock="Bottom" AnchorHorizontal="100%">
                            <Items>
                                <ext:TriggerField ID="txtSearchGroupUserPermisstion" runat="server" Width="200" EnableKeyEvents="true" MarginSpec="0 8 0 0">
                                    <Triggers>
                                        <ext:FieldTrigger Icon="Search" />
                                    </Triggers>
                                    <DirectEvents>
                                        <TriggerClick OnEvent="txtSearchGroupUserPermisstion_Event"></TriggerClick>
                                        <KeyUp OnEvent="txtSearchGroupUserPermisstion_Event"></KeyUp>
                                        <KeyPress OnEvent="txtSearchGroupUserPermisstion_Event"></KeyPress>
                                    </DirectEvents>
                                </ext:TriggerField>
                                <ext:PagingToolbar ID="PagingToolbarGroupUserPermisstionModules" runat="server" StoreID="StorePermisstionModules" BeforePageText="Trang" AfterPageText="của {0}" LastText="Cuối" NextText="Kế tiếp" PrevText="Trở lại" FirstText="Đầu" RefreshText="Làm tươi" DisplayInfo="true" DisplayMsg="Trang {0} - {1} của {2}" />
                            </Items>
                        </ext:Toolbar>
                    </DockedItems>
                </ext:GridPanel>
            </Content>
        </ext:Window>
        <%-----------HotKey-----------------%>
        <ext:KeyMap runat="server" Target="={Ext.isGecko ? Ext.getDoc() : Ext.getBody()}">
             <Binding>
                  <ext:KeyBinding Handler="#{WindowsUserPermisstion}.show();">
                    <Keys>
                        <ext:Key Code="F2" />
                    </Keys>
                  </ext:KeyBinding>
                  <ext:KeyBinding Handler="#{btnDel}.fireEvent('click');">
                    <Keys>
                        <ext:Key Code="DELETE" />
                    </Keys>
                  </ext:KeyBinding>
             </Binding>
        </ext:KeyMap>
    </Content>
</ext:Panel>